package com.mingqijia.gassafety.shared.constant;

import lombok.Getter;
import lombok.RequiredArgsConstructor;


@Getter
@RequiredArgsConstructor
public enum MessagePushTypeEnum {

    //1 短信 2 短信 3 微信模版消息 4机器人外呼
    LOCAL(0, 1, "本地消息", "Local", "local"),
    SMS(1, 2, "短信", "Sms", "sms"),
    WX(2, 3, "微信", "Wx", "wxtpl"),
    CALL(3, 4, "外呼", "Call", "call");

    private final int code; // 服务到期提醒推送方式编码
    private final int gasWarnCode; // 燃气泄露报警策略推送方式编码
    private final String name;
    private final String value;
    private final String type;

    public static MessagePushTypeEnum getMessagePushType(int code) {
        for (MessagePushTypeEnum messagePushTypeEnum : MessagePushTypeEnum.values()) {
            if (messagePushTypeEnum.getCode()==(code)) return messagePushTypeEnum;
        }
        return null;
    }
}
